package day08;


public class Code {
    String name;
    public static int age = 1;

    static {
        System.out.println("静态代码块");
    }

    {
        System.out.println("构造代码块");
    }

    public Code(String name) {
        this.name = name;
        System.out.println("有参构造代码块" + name);
    }

    public Code() {
        System.out.println("无参构造代码块");
    }

    public static void test() {
        System.out.println("普通代码块");
    }

    public static void main(String[] args) {
        Code.test();

        Code p1 = new Code();
        System.out.println(Code.age);
        System.out.println(Code.class);

    }
}

class Main4 {
    public static void main(String[] args) {
        Code.test();
    }
}